<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>设置字体</title>
</head>
  <style>
    div{
      width: 200px;
      height: 200px;
      border: 1px solid black;
    }
    #d1{
        font-size: 12px;
        font-family: 宋体;
    }
    #d2{
        font-size: 24px;
        font-family: 楷体;
    }
    #d3{
        font-size: 36px;
        font-family: 黑体;
    }
  </style>
</head>
<body>
      <div id="d1">
        这是d1
      </div>
      <div id="d2">
        这是d2
      </div>
      <div id="d3">
        这是d3
      </div>
</body>
</html>